package com.xff.bean;

import org.springframework.stereotype.Component;

import java.util.*;

@Component
public class Person {
    private int id;
    private String name;
    private int age;
    private String gender;
    //private Properties properties;
    private String[] hobbies;
    private List<Book> list;
    private Set<Integer> set;
    private Map<String,Object> map;
    private Book boobk;



    public Person(int id, String name, int age, String gender) {
        this.id = id;
        this.name = name;
        this.age = age;
        this.gender = gender;
        System.out.println("2建");

    }

    public Person(Book book ){
        this.boobk = book;
    }

    public void init(){
        System.out.println("初始化");
    }
    public  void destory()
    {
        System.out.println("销毁");
    }
    public Person() {
        System.out.println("person被创建");
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

//    public Properties getProperties() {
//        return properties;
//    }
//
//    public void setProperties(Properties properties) {
//        this.properties = properties;
//    }

    public String[] getHobbies() {
        return hobbies;
    }

    public void setHobbies(String[] hobbies) {
        this.hobbies = hobbies;
    }

    public List<Book> getList() {
        return list;
    }

    public void setList(List<Book> list) {
        this.list = list;
    }

    public Set<Integer> getSet() {
        return set;
    }

    public void setSet(Set<Integer> set) {
        this.set = set;
    }

    public Map<String, Object> getMap() {
        return map;
    }

    public void setMap(Map<String, Object> map) {
        this.map = map;
    }


    public Book getBook() {
        return boobk;
    }

    public void setBook(Book book) {
        this.boobk = book;
    }

    @Override
    public String toString() {
        return "Person{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                //", properties=" + properties +
                ", hobbies=" + Arrays.toString(hobbies) +
                ", list=" + list +
                ", set=" + set +
                ", map=" + map +
                ", book=" + boobk +
                '}';
    }
}
